package com.zjxf.repository;

import com.zjxf.base.bean.po.CmsSchoolNews;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 新闻
 *
 * @author ZhangWei
 * @date 2021/4/6/006 10:49
 */
@Repository
public interface CmsSchoolNewsRepository extends JpaRepository<CmsSchoolNews, Long>, JpaSpecificationExecutor<CmsSchoolNews> {

    /**
     * 根据id与删除状态查找
     *
     * @param id
     * @param deleteState
     * @return
     */
    Optional<CmsSchoolNews> findByIdAndDeleteState(Long id, Integer deleteState);
}
